The AppleScriptâ„¢ component is an OSA component that implements the AppleScriptâ„¢ scripting language. It is possible to have other OSA components that support other scripting languages. We have include here some other OSA components to illustrate the concept.
OSASampleComponent is a sample program on how to write an OSA Component. This is very preliminary; some of the details may be wrong and not all OSA calls are implemented. The only thing it does is to translate "one", "two", "three" to "1", "2", "3" etc. The source is included so that you can start to build your own OSA Component. After you install the component, you should be able to see it from the pop up menu in Script Editor and you can use OSASampleComponent after you select the component.
Also included is a program called DoScriptFromOSA that let you do a little more with some existing programs that support the "Do Script" ('dosc') Apple Event. It is an application and you do not need to install it. To talk to an application through DoScriptFromOSA, you drop your application (such as HyperCard and ToolServer) into DoScriptFromOSA to register it. (What's actually registered is a simple OSA component that runs scripts by sending them via DoScript events.) Then you can run it from Script Editor. For example, if you register HyperCard and select it as the scripting component of a Script Editor window, then you can type in HyperTalk commands and execute them. A DoScript command is sent to HyperCard and if there a result it is returned to the Script Editor result window.